package mystarter;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.dyyx.mystarter.configuration.MyStarter2AutoConfiguration;
import com.dyyx.mystarter.service.MyStarterService;



@RestController
@SpringBootApplication
//@SpringBootApplication(exclude = MyStarter2AutoConfiguration.class)
//@EnableAutoConfiguration(exclude = MyStarter2AutoConfiguration.class)
public class DemoApp{
	
	
	@Autowired
	private MyStarterService  myStarterService;
	
	
	
	public static void main(String[] args) {
		SpringApplication.run(DemoApp.class, args);	
	}
	
	
	@RequestMapping("/")
	public String query(HttpServletRequest request) {
		String str = myStarterService.sayHello() +","+new Date();
		str = str + ",myStarter2Enable="+System.getProperty("myStarter2Enable");
		return str;
	}
	
	
}